<include file="Public/header" title="权限列表" />

<form name="myform" id="myform" method="post">
<div id="page-wrapper">
    
    <div class="row">
        <div class="col-md-6">
            <a href="{:U('Privilege/add')}" class="btn btn-success">添加权限</a>
             <a id="batchDel" href="javascript:void(0)">
             <input form="myform" formaction="{:U('Privilege/batchDel')}" type="submit" class="btn btn-primary btn2" value="批量删除" /></a>
        </div>

    </div>
     
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th class="tc" width="5%"><input class="allChoose" name="" id='check' type="checkbox"></th>
                <th>ID</th>
                <th>权限名称</th>
                <th>模块名称</th>
                <th>控制器名称</th>
                <th>方法名称</th>
                <th>上级权限id</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        <volist name="data" id="vo">
            <tr>
                <td class="tc"><input name="ids[]" value="{$vo.id}" class="check" type="checkbox"></td>
                <td>{$vo.id}</td>
                <td>{$vo.level|level}{$vo.name}</td>
                <td>{$vo.m}</td>
                <td>{$vo.c}</td>
                <td>{$vo.f}</td>
                <td>{$vo.pid}</td>
                <td><a href="__CONTROLLER__/edit/id/{$vo.id}">编辑</a> | <a href="__CONTROLLER__/del/id/{$vo.id}" style="color:red;" onclick="javascript:return del('您真的确定要删除吗？\n\n删除后将不能恢复!');">删除</a></td>
            </tr>
        </volist>
        </tbody>
    </table>
    {$page}
</div>
</form>
<script type="text/javascript">
    $("#check").click(function(){

        if($('#check').is(':checked')){
            $(".check").attr("checked","checked")
        }else{
            $(".check").removeAttr("checked")
        }
    })
</script>
<include file="Public/footer" />